﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace MyGeneric20180617
{
    class CommonMethod
    {
        /// <summary>
        /// 
        /// </summary>
        /// <param name="iParameter"></param>
        public static void ShowInt(int iParameter)
        {
            Console.WriteLine("This is {0}, parameter={1}, type={2}",typeof(CommonMethod).Name, iParameter.GetType().Name,iParameter);
        }

        /// <summary>
        /// 
        /// </summary>
        /// <param name="iParameter"></param>
        public static void ShowString(string iParameter)
        {
            Console.WriteLine("This is {0}, parameter={1}, type={2}", typeof(CommonMethod).Name, iParameter.GetType().Name, iParameter);
        }

        /// <summary>
        /// 
        /// </summary>
        /// <param name="iParameter"></param>
        public static void ShowDatetime(DateTime iParameter)
        {
            Console.WriteLine("This is {0}, parameter={1}, type={2}", typeof(CommonMethod).Name, iParameter.GetType().Name, iParameter);
        }

        /// <summary>
        /// object
        /// 1.任何父类出现的地方，都可以用子类来替换
        /// 2. object是一切类型的父类
        /// </summary>
        /// <param name="iParameter"></param>
        public static void ShowObject(Object iParameter)
        {
            Console.WriteLine("This is {0}, parameter={1}, type={2}", typeof(CommonMethod).Name, iParameter.GetType().Name, iParameter);
        }
    }
}
